In recent years, as an efficient encoding/decoding apparatus adapted for compression-encoding a digital signal thereafter to decode such encoded signal, there have appeared such digital VTRs adapted to compression-encode, e.g., a digital video signal to record such encoded signal onto a recording medium to decode a signal reproduced from the recording medium.
In the above-mentioned VTRs, a procedure as described below is generally employed to compress a video signal to record the compressed signal to further reproduce the recorded signal to expand it.
Namely, although not shown, digital video data on the time axis delivered to signal recording system (encoding side) is first caused to undergo orthogonal transform processing, e.g., Discrete Cosine Transform (DCT), etc. so that such data is transformed into data on the frequency axis. The video data on the frequency axis is quantized and is further caused to undergo, e.g., variable length encoding, etc. so that such data is compressed. The compressed video data is recorded onto a magnetic tape as a recording medium.
Moreover, at signal reproducing system (decoding side), the compressed video data recorded on the recording medium is reproduced. This reproduced data is expanded by variable length decoding, and is further caused to undergo inverse quantization. The inversely quantized data is caused to undergo Inverse Discrete Cosine Transform (IDCT) as inverse orthogonal transform so that the video data on the frequency axis is restored into video data on the time axis for a second time. Thereafter, such restored video data will be taken out.
As digital VTR for carrying out compression-encoding of such video signal, there are, e.g., digital VTRs using, e.g., predictive encoding system between frames/between fields. In such digital VTR, it is necessary to allow local decode picture for carrying out the predictive encoding at the encoding side and decode picture of the decoding side to be in correspondence with each other. At this time, there is the problem that if operation methods at inverse transform (inverse orthogonal transform) in local decoding at the encoding side and inverse transform (inverse orthogonal transform) at the decoding side and rounding methods at the encoding side and the decoding side are different, miss match which will be described later may take place. For this reason, in the recommendation H.261 (Television conference/telephone low speed moving picture encoding algorithm) in Comite Consultatif Internationale Telegraphique et Telephonique (CCITT), quantization representative values are caused to be odd number as shown in Table 1.
TABLE 1 __________________________________________________________________________ QUANTIZATION REPRESENTATIVE VALUE OF QUANTIZATION WITH DEAD ZONE QUANT 1 2 3 4 . 8 9 . 17 18 . 30 31 .backslash. QUANTIZATION INDEX __________________________________________________________________________ -127 -255 -509 -765 -1019 . -2039 -2048 . -2048 -2048 . -2048 -2048 -126 -253 -505 -759 -1011 . -2023 -2048 . -2048 -2048 . -2048 -2048 . . . . . . . . . . . . . . -2 -5 -9 -15 -19 . -39 -45 . -85 -89 . -149 -155 -1 -3 -5 -9 -11 . -23 -27 . -51 -53 . -89 -93 0 0 0 0 0 . 0 0 . 0 0 . 0 0 1 3 5 9 11 . 23 27 . 51 53 . 89 93 2 5 9 15 19 . 39 45 . 85 89 . 149 155 3 7 13 21 27 . 55 63 . 119 125 . 209 217 4 9 17 27 35 . 71 81 . 153 161 . 269 279 5 11 21 33 43 . 87 99 . 187 197 . 329 341 . . . . . . . . . . . . . . 56 113 225 339 451 . 903 1017 . 1921 2033 . 2047 2047 57 115 229 345 459 . 919 1035 . 1955 2047 . 2047 2047 58 117 233 351 467 . 935 1053 . 1989 2047 . 2047 2047 59 119 237 357 475 . 951 1071 . 2023 2047 . 2047 2047 60 121 241 363 483 . 967 1089 . 2047 2047 . 2047 2047 . . . . . . . . . . . . . . 125 251 501 753 1003 . 2007 2047 . 2047 2047 . 2047 2047 126 253 505 759 1011 . 2023 2047 . 2047 2047 . 2047 2047 127 255 509 765 1019 . 2039 2047 . 2047 2047 . 2047 2047 __________________________________________________________________________
Namely, as shown in the Table 1 mentioned above, in the above-mentioned recommendation H.261, quantization representative values are odd number except for -2048. Employment of odd number as the quantization representative value is to solve the problem that even if the IDCT standard is satisfied, miss match may take place between IDCT of different designs. In the Table 1, quantization representative values are symmetrical in positive and negative directions except for +2047/-2048. In addition, step size is equal to 2.times.QUANT.
Meanwhile, while the above-mentioned miss match is caused by the fact that operation methods and/or rounding methods in inverse transform processing are different, even in the case where operation methods and/or rounding methods in the inverse transform processing are not different, similar problem may take place.
For example, in digital VTRs, the problem of picture degradation (deterioration) in multi-generation characteristic at the time of direct digital dubbing may take place as the above-mentioned miss match.
Namely, there is the problem that pattern emphasis by monotonous increase or decrease of amplitude level of a certain specific picture pattern takes place.
The reason why picture degradation takes place in the multi-generation characteristic at the time of direct digital dubbing in the digital VTR will now be described with reference to the attached drawings.
The configuration employed in the case where the above-mentioned direct digital dubbing is carried out in the digital VTR is shown in FIG. 1.
In this FIG. 1, an input video signal delivered through terminal 103 is recorded on magnetic tape in digital VTR 100. Output terminal of the digital VTR 100 and input terminal of digital VTR 101 are connected, and output terminal of digital VTR 101 and input terminal of digital VTR100 are connected. In respective digital VTRs 100, 101, recording/reproduction is repeated, whereby multi-dubbing is carried out. In this example, output terminal of digital VTR 106 is connected also to monitor 102. Accordingly, it is possible to observe change of picture quality by multi-dubbing by means of the monitor 102.
Moreover, the respective digital VTRs 100, 101 of FIG. 1 are digital VTR of component recording in which bit rate reduction is employed. It is now assumed that, as the system of bit rate reduction, transform encoding+variable length encoding is employed and the DCT mentioned above is employed as transform basic (basis) function. Further, it is assumed that these respective digital VTRs 100, 101 are adapted to support system of 10 bit video, and operation accuracy of transform-inverse transform (DCT-IDCT) is thus adjusted under the condition where operation word length is taken (ensured) so as to sufficiently satisfy such video accuracy.
Simplified configuration for carrying out direct digital dubbing shown in FIG. 1 can be as shown in FIG. 2.
Namely, in FIG. 2, terminal 103 is supplied with data from one digital VTR as input data, and this input data is caused to undergo DCT by DCT Circuit 111. Coefficient data from the DCT circuit 111 is quantized by re-quantizer (quantization/inverse quantization element) 112, and its output is sent to IDCT circuit 113. Rounding error Erc takes place in output from the re-quantizer 112. Moreover, rounding error Ers takes place also in output from the IDCT circuit 113 and output of the IDCT circuit 113 is sent to the DCT circuit 111. in this example, rounding in infinity direction which will be described later is employed for this rounding. Output of IDCT circuit 113 is sent to monitor, etc. from terminal 104.
Moreover, when multi-dubbing in FIG. 2 is expressed by further different representation, such multi-dubbing can be indicated as shown in FIG. 3. In FIG. 3, the case where, e.g., two times of dubbing operations (i.e., the case where three times of transform-inverse transform operations are carried out) is shown. The two times of dubbing operations correspond to the fact that three sets of configurations each comprised of DCT circuit 111, quantizer/inverse quantizer 112, and IDCT circuit 113 are connected in series.
When the relationship between word length of input/output and the significant digit is expressed in a conceptual manner in the configuration of FIG. 2, such relationship can be expressed as shown in FIG. 4.
In FIG. 4, coefficients (AC coefficients) except for DC coefficient are uniformly quantized. Here, quantization step of DC coefficient is assumed to be qdc and quantization step of AC coefficient is assumed to be qac. Moreover, normalized DCT, IDCT are used. At this time, the relationship between bits of coefficient plane and re-quantization step is expressed below: EQU qxx=divisor EQU quantization level=qxx.Q[coefficient/qxx]
In the above expression, Q[ ] indicates rounding.
Accordingly, for example,
qdc=qac=1 . . . rounding into coefficient plane 12 bits PA1 qdc=qac=2 . . . rounding into coefficient plane 11 bits PA1 qdc=qac=4 . . . rounding into coefficient plane 10 bits
In digital VTR as described above, when it is assumed that there is no problem because sufficient accuracy is ensured in operation of DCT-IDCT, it is considered that generation of picture degradation (monotonous increase or decrease of specific picture pattern) at the time of direct digital dubbing results from the fact that rounding errors are accumulated.
Here, as the rounding system, there are, e.g., simple rounding (rounding in positive direction) or rounding in infinity direction, etc. Differences between these rounding systems will now be described below.
Rounding in positive direction (simple rounding) will be first described with reference to FIG. 5.
In FIG. 5, mark .oval-hollow. in the figure indicates that value marked in this way is not included and mark .oval-solid. indicates that value marked in this way is included. Namely, in A and B of FIG. 5, when value is more than -.DELTA./2 and is less than .DELTA./2, value within that range is rounded into 0; when value is more than .DELTA./2 and is less than 3.DELTA./2, value within that range is rounded into 1.multidot.2.sup.-b ; when value is more than 3.DELTA./2 and is less than 5.DELTA./2, value within that range is rounded into 2.multidot.2.sup.-b ; when value is more than -3.DELTA./2 and is less than -.DELTA./2, value within that range is rounded into -1.multidot.2.sup.-b ; and when value is more than -5.DELTA./2 and is less than -8.DELTA./2, value within that range is rounded into -2.multidot.2.sup.-b. In addition P( ) of C indicates probability.
In the rounding in positive direction (simple rounding), since judgment is carried out only by bits to carry out rounding, boundary point is always rounded up. Accordingly, as designated at C of FIG. 5, error value always includes .DELTA./2. As a result, distribution of errors deviates. It should be noted that the boundary point is the just half of bit subject to rounding, i.e., .+-.0.5, and is point where asymmetry appears in the distribution of errors.
From facts as described above, rounding in infinity direction is conventionally used.
The rounding in infinity direction will now be described with reference to FIG. 8.
Also in this FIG. 8, mark .oval-hollow. in the figure indicates that value marked in this way is not included and mark .oval-solid. indicates that value marked in this way is included. Namely, in A and B of FIG. 6, when value is greater than -.DELTA./2 and is less than .DELTA./2, value within that range is rounded into 0; when value is more than .DELTA./2 and is less than 3.DELTA./2, value within that range is rounded into 1.multidot.2.sup.-b ; when value is more than 3.DELTA./2 and is less than 5.DELTA./2, value within that range is rounded into 2.multidot.2.sup.-b ; when value is more than -3.DELTA./2 and is less than -.DELTA./2, value within that range is rounded into -1.multidot.2.sup.-b ; and when value is more than -5.DELTA./2 and is less than -3.DELTA./2, value within that range is rounded into -2.multidot.2.sup.-b. In addition, P( ) of C of FIG. 8 also indicates probability.
In this rounding in infinity direction, boundary point is rounded up so that positive and negative values are the same in terms of absolute value. Accordingly, there result three kinds of distributions of errors as indicated by (a).about.(c) of C of FIG. 6, and these distributions of errors are balanced with X=0 being as center.
As stated above, in rounding, it is seen that only point of .DELTA./2 is point which allows the range of error to be out of balance.
Explanation will now be given in more practical sense.
Here, data of pixels of 2.times.2 on the time axis is assumed to be expressed below:
______________________________________ D00 D01 D10 D11, ______________________________________
and data of pixels of 2.times.2 on the frequency axis is assumed to be expressed below:
______________________________________ C00 C01 C10 C11 ______________________________________
Moreover, in order to reduce portions subject to rounding operation, DCT of pixel data of 2.times.2 and IDCT of pixel data of 2.times.2 corresponding thereto are expressed as follows:
______________________________________ DCT C00 = D00 + D01 + D10 + D11 C01 = D00 - D01 + D10 - D11 C10 = D00 + D01 - D10 - D11 C11 = D00 - D01 - D10 + D11 IDCT D00 = (C00 + C01 + C10 + C11)/4 D01 = (C00 - C01 + C10 - C11)/4 D10 = (C00 + C01 - C10 - C11)/4 D11 = (C00 - C01 - C10 + C11)/4 ______________________________________
Here, change of data in the case where two times of dubbing operations, i.e., three times of encoding/decoding processing are implemented is as follows. As the rounding method at this time, rounding in infinity direction is used and step size of quantization is assumed to be 2.
Change of data in the case where, e.g., {3, 1, 1, 0} is given to input is as follows.
______________________________________ Input D = {3, 1, 1, 0} First encoding/decoding After DCT C = {5, 3, 3, 1} After quantization/inverse C = {6, 4, 4, 2} quantization After IDCT before rounding D = {4.0, 1.0, 1.0, 0.0} After IDCT after rounding D = {4, 1, 1, 0} Second encoding/decoding (First dubbing) After DCT C = {6, 4, 4, 2} After quantization/inverse C = {6, 4, 4, 2} quantization After IDCT before rounding D = {4.0, 1.0, 1.0, 0.0} After IDCT after rounding D = {4, 1, 1, 0} Third encoding/decoding (Second dubbing) After DCT C = {6, 4, 4, 2} After quantization/inverse C = {6, 4, 4, 2} quantization After IDCT before rounding D = {4.0, 1.0, 1.0, 0.0} After IDCT after rounding D = {4, 1, 1, 0} ______________________________________
At the second operation and operations subsequent thereto, even if encoding/decoding (i.e., dubbing) operations are implemented many times, there is no change in data.
Change of data in the case where, e.g., {1, 1, 1, 0} is given to input is as follows:
______________________________________ Input D = {1, 1, 1, 0} First encoding/decoding After DCT C = {3, 1, 1, -1} After quantization/inverse C = {4, 2, 2, -2} quantization After IDCT before rounding D = {1.5, 1.5, 1.5, -0.5} After IDCT after rounding D = {2, 2, 2, -1} Second encoding/decoding (First dubbing) After DCT C = {5, 3, 3, -3} After quantization/inverse C = {6, 4, 4, -4} quantization After IDCT before rounding D = {2.5, 2.5, 2.5, -1.5} After IDCT after rounding D = {3, 3, 3, -2} Third encoding/decoding (Second dubbing) After DCT C = {7, 5, 5, -5} After quantization/inverse C = {8, 6, 6, -6} quantization After IDCT before rounding D = {3.5, 3.5, 3.5, -2.5} After IDCT after rounding D = {4, 4, 4, -3} ______________________________________
By implementation of the second encoding/decoding (i.e., dubbing) operations and operations subsequent thereto, data would change in divergence direction. In other words, rounding errors are accumulated.
As stated above, there are instances where when rounding in infinity direction is used as a method of operation rounding in quantization and inverse quantization, data changes and diverges every time of dubbing with respect to a certain input, i.e., rounding errors are accumulated.
In view of facts as described above, an object of this invention is to provide an efficient encoding/decoding apparatus which permits picture deterioration to be extremely less in multi-generation characteristic at the time of, e.g., direct digital dubbing.